//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2021 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto/tree/main/CodeGenerator. DO NOT EDIT.

import Foundation
import SotoCore

extension Shield {
    // MARK: Enums

    public enum AttackLayer: String, CustomStringConvertible, Codable {
        case application = "APPLICATION"
        case network = "NETWORK"
        public var description: String { return self.rawValue }
    }

    public enum AttackPropertyIdentifier: String, CustomStringConvertible, Codable {
        case destinationUrl = "DESTINATION_URL"
        case referrer = "REFERRER"
        case sourceAsn = "SOURCE_ASN"
        case sourceCountry = "SOURCE_COUNTRY"
        case sourceIpAddress = "SOURCE_IP_ADDRESS"
        case sourceUserAgent = "SOURCE_USER_AGENT"
        case wordpressPingbackReflector = "WORDPRESS_PINGBACK_REFLECTOR"
        case wordpressPingbackSource = "WORDPRESS_PINGBACK_SOURCE"
        public var description: String { return self.rawValue }
    }

    public enum AutoRenew: String, CustomStringConvertible, Codable {
        case disabled = "DISABLED"
        case enabled = "ENABLED"
        public var description: String { return self.rawValue }
    }

    public enum ProactiveEngagementStatus: String, CustomStringConvertible, Codable {
        case disabled = "DISABLED"
        case enabled = "ENABLED"
        case pending = "PENDING"
        public var description: String { return self.rawValue }
    }

    public enum ProtectedResourceType: String, CustomStringConvertible, Codable {
        case applicationLoadBalancer = "APPLICATION_LOAD_BALANCER"
        case classicLoadBalancer = "CLASSIC_LOAD_BALANCER"
        case cloudfrontDistribution = "CLOUDFRONT_DISTRIBUTION"
        case elasticIpAllocation = "ELASTIC_IP_ALLOCATION"
        case globalAccelerator = "GLOBAL_ACCELERATOR"
        case route53HostedZone = "ROUTE_53_HOSTED_ZONE"
        public var description: String { return self.rawValue }
    }

    public enum ProtectionGroupAggregation: String, CustomStringConvertible, Codable {
        case max = "MAX"
        case mean = "MEAN"
        case sum = "SUM"
        public var description: String { return self.rawValue }
    }

    public enum ProtectionGroupPattern: String, CustomStringConvertible, Codable {
        case all = "ALL"
        case arbitrary = "ARBITRARY"
        case byResourceType = "BY_RESOURCE_TYPE"
        public var description: String { return self.rawValue }
    }

    public enum SubResourceType: String, CustomStringConvertible, Codable {
        case ip = "IP"
        case url = "URL"
        public var description: String { return self.rawValue }
    }

    public enum SubscriptionState: String, CustomStringConvertible, Codable {
        case active = "ACTIVE"
        case inactive = "INACTIVE"
        public var description: String { return self.rawValue }
    }

    public enum Unit: String, CustomStringConvertible, Codable {
        case bits = "BITS"
        case bytes = "BYTES"
        case packets = "PACKETS"
        case requests = "REQUESTS"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AssociateDRTLogBucketRequest: AWSEncodableShape {
        /// The Amazon S3 bucket that contains your AWS WAF logs.
        public let logBucket: String

        public init(logBucket: String) {
            self.logBucket = logBucket
        }

        public func validate(name: String) throws {
            try self.validate(self.logBucket, name: "logBucket", parent: name, max: 63)
            try self.validate(self.logBucket, name: "logBucket", parent: name, min: 3)
            try self.validate(self.logBucket, name: "logBucket", parent: name, pattern: "^([a-z]|(\\d(?!\\d{0,2}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})))([a-z\\d]|(\\.(?!(\\.|-)))|(-(?!\\.))){1,61}[a-z\\d]$")
        }

        private enum CodingKeys: String, CodingKey {
            case logBucket = "LogBucket"
        }
    }

    public struct AssociateDRTLogBucketResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AssociateDRTRoleRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the role the DRT will use to access your AWS account. Prior to making the AssociateDRTRole request, you must attach the AWSShieldDRTAccessPolicy managed policy to this role. For more information see Attaching and Detaching IAM Policies.
        public let roleArn: String

        public init(roleArn: String) {
            self.roleArn = roleArn
        }

        public func validate(name: String) throws {
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 1)
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:aws:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+")
        }

        private enum CodingKeys: String, CodingKey {
            case roleArn = "RoleArn"
        }
    }

    public struct AssociateDRTRoleResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AssociateHealthCheckRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the health check to associate with the protection.
        public let healthCheckArn: String
        /// The unique identifier (ID) for the Protection object to add the health check association to.
        public let protectionId: String

        public init(healthCheckArn: String, protectionId: String) {
            self.healthCheckArn = healthCheckArn
            self.protectionId = protectionId
        }

        public func validate(name: String) throws {
            try self.validate(self.healthCheckArn, name: "healthCheckArn", parent: name, max: 2048)
            try self.validate(self.healthCheckArn, name: "healthCheckArn", parent: name, min: 1)
            try self.validate(self.healthCheckArn, name: "healthCheckArn", parent: name, pattern: "^arn:aws:route53:::healthcheck/\\S{36}$")
            try self.validate(self.protectionId, name: "protectionId", parent: name, max: 36)
            try self.validate(self.protectionId, name: "protectionId", parent: name, min: 1)
            try self.validate(self.protectionId, name: "protectionId", parent: name, pattern: "[a-zA-Z0-9\\\\-]*")
        }

        private enum CodingKeys: String, CodingKey {
            case healthCheckArn = "HealthCheckArn"
            case protectionId = "ProtectionId"
        }
    }

    public struct AssociateHealthCheckResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AssociateProactiveEngagementDetailsRequest: AWSEncodableShape {
        /// A list of email addresses and phone numbers that the DDoS Response Team (DRT) can use to contact you for escalations to the DRT and to initiate proactive customer support.  To enable proactive engagement, the contact list must include at least one phone number.  The contacts that you provide here replace any contacts that were already defined. If you already have contacts defined and want to use them, retrieve the list using DescribeEmergencyContactSettings and then provide it here.
        public let emergencyContactList: [EmergencyContact]

        public init(emergencyContactList: [EmergencyContact]) {
            self.emergencyContactList = emergencyContactList
        }

        public func validate(name: String) throws {
            try self.emergencyContactList.forEach {
                try $0.validate(name: "\(name).emergencyContactList[]")
            }
            try self.validate(self.emergencyContactList, name: "emergencyContactList", parent: name, max: 10)
            try self.validate(self.emergencyContactList, name: "emergencyContactList", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case emergencyContactList = "EmergencyContactList"
        }
    }

    public struct AssociateProactiveEngagementDetailsResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AttackDetail: AWSDecodableShape {
        /// List of counters that describe the attack for the specified time period.
        public let attackCounters: [SummarizedCounter]?
        /// The unique identifier (ID) of the attack.
        public let attackId: String?
        /// The array of AttackProperty objects.
        public let attackProperties: [AttackProperty]?
        /// The time the attack ended, in Unix time in seconds. For more information see timestamp.
        public let endTime: Date?
        /// List of mitigation actions taken for the attack.
        public let mitigations: [Mitigation]?
        /// The ARN (Amazon Resource Name) of the resource that was attacked.
        public let resourceArn: String?
        /// The time the attack started, in Unix time in seconds. For more information see timestamp.
        public let startTime: Date?
        /// If applicable, additional detail about the resource being attacked, for example, IP address or URL.
        public let subResources: [SubResourceSummary]?

        public init(attackCounters: [SummarizedCounter]? = nil, attackId: String? = nil, attackProperties: [AttackProperty]? = nil, endTime: Date? = nil, mitigations: [Mitigation]? = nil, resourceArn: String? = nil, startTime: Date? = nil, subResources: [SubResourceSummary]? = nil) {
            self.attackCounters = attackCounters
            self.attackId = attackId
            self.attackProperties = attackProperties
            self.endTime = endTime
            self.mitigations = mitigations
            self.resourceArn = resourceArn
            self.startTime = startTime
            self.subResources = subResources
        }

        private enum CodingKeys: String, CodingKey {
            case attackCounters = "AttackCounters"
            case attackId = "AttackId"
            case attackProperties = "AttackProperties"
            case endTime = "EndTime"
            case mitigations = "Mitigations"
            case resourceArn = "ResourceArn"
            case startTime = "StartTime"
            case subResources = "SubResources"
        }
    }

    public struct AttackProperty: AWSDecodableShape {
        /// The type of distributed denial of service (DDoS) event that was observed. NETWORK indicates layer 3 and layer 4 events and APPLICATION indicates layer 7 events.
        public let attackLayer: AttackLayer?
        /// Defines the DDoS attack property information that is provided. The WORDPRESS_PINGBACK_REFLECTOR and WORDPRESS_PINGBACK_SOURCE values are valid only for WordPress reflective pingback DDoS attacks.
        public let attackPropertyIdentifier: AttackPropertyIdentifier?
        /// The array of contributor objects that includes the top five contributors to an attack.
        public let topContributors: [Contributor]?
        /// The total contributions made to this attack by all contributors, not just the five listed in the TopContributors list.
        public let total: Int64?
        /// The unit of the Value of the contributions.
        public let unit: Unit?

        public init(attackLayer: AttackLayer? = nil, attackPropertyIdentifier: AttackPropertyIdentifier? = nil, topContributors: [Contributor]? = nil, total: Int64? = nil, unit: Unit? = nil) {
            self.attackLayer = attackLayer
            self.attackPropertyIdentifier = attackPropertyIdentifier
            self.topContributors = topContributors
            self.total = total
            self.unit = unit
        }

        private enum CodingKeys: String, CodingKey {
            case attackLayer = "AttackLayer"
            case attackPropertyIdentifier = "AttackPropertyIdentifier"
            case topContributors = "TopContributors"
            case total = "Total"
            case unit = "Unit"
        }
    }

    public struct AttackStatisticsDataItem: AWSDecodableShape {
        /// The number of attacks detected during the time period. This is always present, but might be zero.
        public let attackCount: Int64
        /// Information about the volume of attacks during the time period. If the accompanying AttackCount is zero, this setting might be empty.
        public let attackVolume: AttackVolume?

        public init(attackCount: Int64, attackVolume: AttackVolume? = nil) {
            self.attackCount = attackCount
            self.attackVolume = attackVolume
        }

        private enum CodingKeys: String, CodingKey {
            case attackCount = "AttackCount"
            case attackVolume = "AttackVolume"
        }
    }

    public struct AttackSummary: AWSDecodableShape {
        /// The unique identifier (ID) of the attack.
        public let attackId: String?
        /// The list of attacks for a specified time period.
        public let attackVectors: [AttackVectorDescription]?
        /// The end time of the attack, in Unix time in seconds. For more information see timestamp.
        public let endTime: Date?
        /// The ARN (Amazon Resource Name) of the resource that was attacked.
        public let resourceArn: String?
        /// The start time of the attack, in Unix time in seconds. For more information see timestamp.
        public let startTime: Date?

        public init(attackId: String? = nil, attackVectors: [AttackVectorDescription]? = nil, endTime: Date? = nil, resourceArn: String? = nil, startTime: Date? = nil) {
            self.attackId = attackId
            self.attackVectors = attackVectors
            self.endTime = endTime
            self.resourceArn = resourceArn
            self.startTime = startTime
        }

        private enum CodingKeys: String, CodingKey {
            case attackId = "AttackId"
            case attackVectors = "AttackVectors"
            case endTime = "EndTime"
            case resourceArn = "ResourceArn"
            case startTime = "StartTime"
        }
    }

    public struct AttackVectorDescription: AWSDecodableShape {
        /// The attack type. Valid values:   UDP_TRAFFIC   UDP_FRAGMENT   GENERIC_UDP_REFLECTION   DNS_REFLECTION   NTP_REFLECTION   CHARGEN_REFLECTION   SSDP_REFLECTION   PORT_MAPPER   RIP_REFLECTION   SNMP_REFLECTION   MSSQL_REFLECTION   NET_BIOS_REFLECTION   SYN_FLOOD   ACK_FLOOD   REQUEST_FLOOD   HTTP_REFLECTION   UDS_REFLECTION   MEMCACHED_REFLECTION
        public let vectorType: String

        public init(vectorType: String) {
            self.vectorType = vectorType
        }

        private enum CodingKeys: String, CodingKey {
            case vectorType = "VectorType"
        }
    }

    public struct AttackVolume: AWSDecodableShape {
        /// A statistics object that uses bits per second as the unit. This is included for network level attacks.
        public let bitsPerSecond: AttackVolumeStatistics?
        /// A statistics object that uses packets per second as the unit. This is included for network level attacks.
        public let packetsPerSecond: AttackVolumeStatistics?
        /// A statistics object that uses requests per second as the unit. This is included for application level attacks, and is only available for accounts that are subscribed to Shield Advanced.
        public let requestsPerSecond: AttackVolumeStatistics?

        public init(bitsPerSecond: AttackVolumeStatistics? = nil, packetsPerSecond: AttackVolumeStatistics? = nil, requestsPerSecond: AttackVolumeStatistics? = nil) {
            self.bitsPerSecond = bitsPerSecond
            self.packetsPerSecond = packetsPerSecond
            self.requestsPerSecond = requestsPerSecond
        }

        private enum CodingKeys: String, CodingKey {
            case bitsPerSecond = "BitsPerSecond"
            case packetsPerSecond = "PacketsPerSecond"
            case requestsPerSecond = "RequestsPerSecond"
        }
    }

    public struct AttackVolumeStatistics: AWSDecodableShape {
        /// The maximum attack volume observed for the given unit.
        public let max: Double

        public init(max: Double) {
            self.max = max
        }

        private enum CodingKeys: String, CodingKey {
            case max = "Max"
        }
    }

    public struct Contributor: AWSDecodableShape {
        /// The name of the contributor. This is dependent on the AttackPropertyIdentifier. For example, if the AttackPropertyIdentifier is SOURCE_COUNTRY, the Name could be United States.
        public let name: String?
        /// The contribution of this contributor expressed in Protection units. For example 10,000.
        public let value: Int64?

        public init(name: String? = nil, value: Int64? = nil) {
            self.name = name
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case value = "Value"
        }
    }

    public struct CreateProtectionGroupRequest: AWSEncodableShape {
        /// Defines how AWS Shield combines resource data for the group in order to detect, mitigate, and report events.   Sum - Use the total traffic across the group. This is a good choice for most cases. Examples include Elastic IP addresses for EC2 instances that scale manually or automatically.   Mean - Use the average of the traffic across the group. This is a good choice for resources that share traffic uniformly. Examples include accelerators and load balancers.   Max - Use the highest traffic from each resource. This is useful for resources that don't share traffic and for resources that share that traffic in a non-uniform way. Examples include CloudFront distributions and origin resources for CloudFront distributions.
        public let aggregation: ProtectionGroupAggregation
        /// The Amazon Resource Names (ARNs) of the resources to include in the protection group. You must set this when you set Pattern to ARBITRARY and you must not set it for any other Pattern setting.
        public let members: [String]?
        /// The criteria to use to choose the protected resources for inclusion in the group. You can include all resources that have protections, provide a list of resource Amazon Resource Names (ARNs), or include all resources of a specified resource type.
        public let pattern: ProtectionGroupPattern
        /// The name of the protection group. You use this to identify the protection group in lists and to manage the protection group, for example to update, delete, or describe it.
        public let protectionGroupId: String
        /// The resource type to include in the protection group. All protected resources of this type are included in the protection group. Newly protected resources of this type are automatically added to the group. You must set this when you set Pattern to BY_RESOURCE_TYPE and you must not set it for any other Pattern setting.
        public let resourceType: ProtectedResourceType?

        public init(aggregation: ProtectionGroupAggregation, members: [String]? = nil, pattern: ProtectionGroupPattern, protectionGroupId: String, resourceType: ProtectedResourceType? = nil) {
            self.aggregation = aggregation
            self.members = members
            self.pattern = pattern
            self.protectionGroupId = protectionGroupId
            self.resourceType = resourceType
        }

        public func validate(name: String) throws {
            try self.members?.forEach {
                try validate($0, name: "members[]", parent: name, max: 2048)
                try validate($0, name: "members[]", parent: name, min: 1)
                try validate($0, name: "members[]", parent: name, pattern: "^arn:aws.*")
            }
            try self.validate(self.members, name: "members", parent: name, max: 10000)
            try self.validate(self.members, name: "members", parent: name, min: 0)
            try self.validate(self.protectionGroupId, name: "protectionGroupId", parent: name, max: 36)
            try self.validate(self.protectionGroupId, name: "protectionGroupId", parent: name, min: 1)
            try self.validate(self.protectionGroupId, name: "protectionGroupId", parent: name, pattern: "[a-zA-Z0-9\\\\-]*")
        }

        private enum CodingKeys: String, CodingKey {
            case aggregation = "Aggregation"
            case members = "Members"
            case pattern = "Pattern"
            case protectionGroupId = "ProtectionGroupId"
            case resourceType = "ResourceType"
        }
    }

    public struct CreateProtectionGroupResponse: AWSDecodableShape {
        public init() {}
    }

    public struct CreateProtectionRequest: AWSEncodableShape {
        /// Friendly name for the Protection you are creating.
        public let name: String
        /// The ARN (Amazon Resource Name) of the resource to be protected. The ARN should be in one of the following formats:   For an Application Load Balancer: arn:aws:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id     For an Elastic Load Balancer (Classic Load Balancer): arn:aws:elasticloadbalancing:region:account-id:loadbalancer/load-balancer-name     For an AWS CloudFront distribution: arn:aws:cloudfront::account-id:distribution/distribution-id     For an AWS Global Accelerator accelerator: arn:aws:globalaccelerator::account-id:accelerator/accelerator-id     For Amazon Route 53: arn:aws:route53:::hostedzone/hosted-zone-id     For an Elastic IP address: arn:aws:ec2:region:account-id:eip-allocation/allocation-id
        public let resourceArn: String

        public init(name: String, resourceArn: String) {
            self.name = name
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "[ a-zA-Z0-9_\\\\.\\\\-]*")
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 2048)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:aws.*")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case resourceArn = "ResourceArn"
        }
    }

    public struct CreateProtectionResponse: AWSDecodableShape {
        /// The unique identifier (ID) for the Protection object that is created.
        public let protectionId: String?

        public init(protectionId: String? = nil) {
            self.protectionId = protectionId
        }

        private enum CodingKeys: String, CodingKey {
            case protectionId = "ProtectionId"
        }
    }

    public struct CreateSubscriptionRequest: AWSEncodableShape {
        public init() {}
    }

    public struct CreateSubscriptionResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteProtectionGroupRequest: AWSEncodableShape {
        /// The name of the protection group. You use this to identify the protection group in lists and to manage the protection group, for example to update, delete, or describe it.
        public let protectionGroupId: String

        public init(protectionGroupId: String) {
            self.protectionGroupId = protectionGroupId
        }

        public func validate(name: String) throws {
            try self.validate(self.protectionGroupId, name: "protectionGroupId", parent: name, max: 36)
            try self.validate(self.protectionGroupId, name: "protectionGroupId", parent: name, min: 1)
            try self.validate(self.protectionGroupId, name: "protectionGroupId", parent: name, pattern: "[a-zA-Z0-9\\\\-]*")
        }

        private enum CodingKeys: String, CodingKey {
            case protectionGroupId = "ProtectionGroupId"
        }
    }

    public struct DeleteProtectionGroupResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteProtectionRequest: AWSEncodableShape {
        /// The unique identifier (ID) for the Protection object to be deleted.
        public let protectionId: String

        public init(protectionId: String) {
            self.protectionId = protectionId
        }

        public func validate(name: String) throws {
            try self.validate(self.protectionId, name: "protectionId", parent: name, max: 36)
            try self.validate(self.protectionId, name: "protectionId", parent: name, min: 1)
            try self.validate(self.protectionId, name: "protectionId", parent: name, pattern: "[a-zA-Z0-9\\\\-]*")
        }

        private enum CodingKeys: String, CodingKey {
            case protectionId = "ProtectionId"
        }
    }

    public struct DeleteProtectionResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteSubscriptionRequest: AWSEncodableShape {
        public init() {}
    }

    public struct DeleteSubscriptionResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DescribeAttackRequest: AWSEncodableShape {
        /// The unique identifier (ID) for the attack that to be described.
        public let attackId: String

        public init(attackId: String) {
            self.attackId = attackId
        }

        public func validate(name: String) throws {
            try self.validate(self.attackId, name: "attackId", parent: name, max: 128)
            try self.validate(self.attackId, name: "attackId", parent: name, min: 1)
            try self.validate(self.attackId, name: "attackId", parent: name, pattern: "[a-zA-Z0-9\\\\-]*")
        }

        private enum CodingKeys: String, CodingKey {
            case attackId = "AttackId"
        }
    }

    public struct DescribeAttackResponse: AWSDecodableShape {
        /// The attack that is described.
        public let attack: AttackDetail?

        public init(attack: AttackDetail? = nil) {
            self.attack = attack
        }

        private enum CodingKeys: String, CodingKey {
            case attack = "Attack"
        }
    }

    public struct DescribeAttackStatisticsRequest: AWSEncodableShape {
        public init() {}
    }

    public struct DescribeAttackStatisticsResponse: AWSDecodableShape {
        /// The data that describes the attacks detected during the time period.
        public let dataItems: [AttackStatisticsDataItem]
        public let timeRange: TimeRange

        public init(dataItems: [AttackStatisticsDataItem], timeRange: TimeRange) {
            self.dataItems = dataItems
            self.timeRange = timeRange
        }

        private enum CodingKeys: String, CodingKey {
            case dataItems = "DataItems"
            case timeRange = "TimeRange"
        }
    }

    public struct DescribeDRTAccessRequest: AWSEncodableShape {
        public init() {}
    }

    public struct DescribeDRTAccessResponse: AWSDecodableShape {
        /// The list of Amazon S3 buckets accessed by the DRT.
        public let logBucketList: [String]?
        /// The Amazon Resource Name (ARN) of the role the DRT used to access your AWS account.
        public let roleArn: String?

        public init(logBucketList: [String]? = nil, roleArn: String? = nil) {
            self.logBucketList = logBucketList
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case logBucketList = "LogBucketList"
            case roleArn = "RoleArn"
        }
    }

    public struct DescribeEmergencyContactSettingsRequest: AWSEncodableShape {
        public init() {}
    }

    public struct DescribeEmergencyContactSettingsResponse: AWSDecodableShape {
        /// A list of email addresses and phone numbers that the DDoS Response Team (DRT) can use to contact you if you have proactive engagement enabled, for escalations to the DRT and to initiate proactive customer support.
        public let emergencyContactList: [EmergencyContact]?

        public init(emergencyContactList: [EmergencyContact]? = nil) {
            self.emergencyContactList = emergencyContactList
        }

        private enum CodingKeys: String, CodingKey {
            case emergencyContactList = "EmergencyContactList"
        }
    }

    public struct DescribeProtectionGroupRequest: AWSEncodableShape {
        /// The name of the protection group. You use this to identify the protection group in lists and to manage the protection group, for example to update, delete, or describe it.
        public let protectionGroupId: String

        public init(protectionGroupId: String) {
            self.protectionGroupId = protectionGroupId
        }

        public func validate(name: String) throws {
            try self.validate(self.protectionGroupId, name: "protectionGroupId", parent: name, max: 36)
            try self.validate(self.protectionGroupId, name: "protectionGroupId", parent: name, min: 1)
            try self.validate(self.protectionGroupId, name: "protectionGroupId", parent: name, pattern: "[a-zA-Z0-9\\\\-]*")
        }

        private enum CodingKeys: String, CodingKey {
            case protectionGroupId = "ProtectionGroupId"
        }
    }

    public struct DescribeProtectionGroupResponse: AWSDecodableShape {
        /// A grouping of protected resources that you and AWS Shield Advanced can monitor as a collective. This resource grouping improves the accuracy of detection and reduces false positives.
        public let protectionGroup: ProtectionGroup

        public init(protectionGroup: ProtectionGroup) {
            self.protectionGroup = protectionGroup
        }

        private enum CodingKeys: String, CodingKey {
            case protectionGroup = "ProtectionGroup"
        }
    }

    public struct DescribeProtectionRequest: AWSEncodableShape {
        /// The unique identifier (ID) for the Protection object that is described. When submitting the DescribeProtection request you must provide either the ResourceArn or the ProtectionID, but not both.
        public let protectionId: String?
        /// The ARN (Amazon Resource Name) of the AWS resource for the Protection object that is described. When submitting the DescribeProtection request you must provide either the ResourceArn or the ProtectionID, but not both.
        public let resourceArn: String?

        public init(protectionId: String? = nil, resourceArn: String? = nil) {
            self.protectionId = protectionId
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.protectionId, name: "protectionId", parent: name, max: 36)
            try self.validate(self.protectionId, name: "protectionId", parent: name, min: 1)
            try self.validate(self.protectionId, name: "protectionId", parent: name, pattern: "[a-zA-Z0-9\\\\-]*")
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 2048)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 1)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:aws.*")
        }

        private enum CodingKeys: String, CodingKey {
            case protectionId = "ProtectionId"
            case resourceArn = "ResourceArn"
        }
    }

    public struct DescribeProtectionResponse: AWSDecodableShape {
        /// The Protection object that is described.
        public let protection: Protection?

        public init(protection: Protection? = nil) {
            self.protection = protection
        }

        private enum CodingKeys: String, CodingKey {
            case protection = "Protection"
        }
    }

    public struct DescribeSubscriptionRequest: AWSEncodableShape {
        public init() {}
    }

    public struct DescribeSubscriptionResponse: AWSDecodableShape {
        /// The AWS Shield Advanced subscription details for an account.
        public let subscription: Subscription?

        public init(subscription: Subscription? = nil) {
            self.subscription = subscription
        }

        private enum CodingKeys: String, CodingKey {
            case subscription = "Subscription"
        }
    }

    public struct DisableProactiveEngagementRequest: AWSEncodableShape {
        public init() {}
    }

    public struct DisableProactiveEngagementResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DisassociateDRTLogBucketRequest: AWSEncodableShape {
        /// The Amazon S3 bucket that contains your AWS WAF logs.
        public let logBucket: String

        public init(logBucket: String) {
            self.logBucket = logBucket
        }

        public func validate(name: String) throws {
            try self.validate(self.logBucket, name: "logBucket", parent: name, max: 63)
            try self.validate(self.logBucket, name: "logBucket", parent: name, min: 3)
            try self.validate(self.logBucket, name: "logBucket", parent: name, pattern: "^([a-z]|(\\d(?!\\d{0,2}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})))([a-z\\d]|(\\.(?!(\\.|-)))|(-(?!\\.))){1,61}[a-z\\d]$")
        }

        private enum CodingKeys: String, CodingKey {
            case logBucket = "LogBucket"
        }
    }

    public struct DisassociateDRTLogBucketResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DisassociateDRTRoleRequest: AWSEncodableShape {
        public init() {}
    }

    public struct DisassociateDRTRoleResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DisassociateHealthCheckRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the health check that is associated with the protection.
        public let healthCheckArn: String
        /// The unique identifier (ID) for the Protection object to remove the health check association from.
        public let protectionId: String

        public init(healthCheckArn: String, protectionId: String) {
            self.healthCheckArn = healthCheckArn
            self.protectionId = protectionId
        }

        public func validate(name: String) throws {
            try self.validate(self.healthCheckArn, name: "healthCheckArn", parent: name, max: 2048)
            try self.validate(self.healthCheckArn, name: "healthCheckArn", parent: name, min: 1)
            try self.validate(self.healthCheckArn, name: "healthCheckArn", parent: name, pattern: "^arn:aws:route53:::healthcheck/\\S{36}$")
            try self.validate(self.protectionId, name: "protectionId", parent: name, max: 36)
            try self.validate(self.protectionId, name: "protectionId", parent: name, min: 1)
            try self.validate(self.protectionId, name: "protectionId", parent: name, pattern: "[a-zA-Z0-9\\\\-]*")
        }

        private enum CodingKeys: String, CodingKey {
            case healthCheckArn = "HealthCheckArn"
            case protectionId = "ProtectionId"
        }
    }

    public struct DisassociateHealthCheckResponse: AWSDecodableShape {
        public init() {}
    }

    public struct EmergencyContact: AWSEncodableShape & AWSDecodableShape {
        /// Additional notes regarding the contact.
        public let contactNotes: String?
        /// The email address for the contact.
        public let emailAddress: String
        /// The phone number for the contact.
        public let phoneNumber: String?

        public init(contactNotes: String? = nil, emailAddress: String, phoneNumber: String? = nil) {
            self.contactNotes = contactNotes
            self.emailAddress = emailAddress
            self.phoneNumber = phoneNumber
        }

        public func validate(name: String) throws {
            try self.validate(self.contactNotes, name: "contactNotes", parent: name, max: 1024)
            try self.validate(self.contactNotes, name: "contactNotes", parent: name, min: 1)
            try self.validate(self.contactNotes, name: "contactNotes", parent: name, pattern: "^[\\w\\s\\.\\-,:/()+@]*$")
            try self.validate(self.emailAddress, name: "emailAddress", parent: name, max: 150)
            try self.validate(self.emailAddress, name: "emailAddress", parent: name, min: 1)
            try self.validate(self.emailAddress, name: "emailAddress", parent: name, pattern: "^\\S+@\\S+\\.\\S+$")
            try self.validate(self.phoneNumber, name: "phoneNumber", parent: name, max: 16)
            try self.validate(self.phoneNumber, name: "phoneNumber", parent: name, min: 1)
            try self.validate(self.phoneNumber, name: "phoneNumber", parent: name, pattern: "^\\+[1-9]\\d{1,14}$")
        }

        private enum CodingKeys: String, CodingKey {
            case contactNotes = "ContactNotes"
            case emailAddress = "EmailAddress"
            case phoneNumber = "PhoneNumber"
        }
    }

    public struct EnableProactiveEngagementRequest: AWSEncodableShape {
        public init() {}
    }

    public struct EnableProactiveEngagementResponse: AWSDecodableShape {
        public init() {}
    }

    public struct GetSubscriptionStateRequest: AWSEncodableShape {
        public init() {}
    }

    public struct GetSubscriptionStateResponse: AWSDecodableShape {
        /// The status of the subscription.
        public let subscriptionState: SubscriptionState

        public init(subscriptionState: SubscriptionState) {
            self.subscriptionState = subscriptionState
        }

        private enum CodingKeys: String, CodingKey {
            case subscriptionState = "SubscriptionState"
        }
    }

    public struct Limit: AWSDecodableShape {
        /// The maximum number of protections that can be created for the specified Type.
        public let max: Int64?
        /// The type of protection.
        public let type: String?

        public init(max: Int64? = nil, type: String? = nil) {
            self.max = max
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case max = "Max"
            case type = "Type"
        }
    }

    public struct ListAttacksRequest: AWSEncodableShape {
        /// The end of the time period for the attacks. This is a timestamp type. The sample request above indicates a number type because the default used by WAF is Unix time in seconds. However any valid timestamp format is allowed.
        public let endTime: TimeRange?
        /// The maximum number of AttackSummary objects to return. If you leave this blank, Shield Advanced returns the first 20 results. This is a maximum value. Shield Advanced might return the results in smaller batches. That is, the number of objects returned could be less than MaxResults, even if there are still more objects yet to return. If there are more objects to return, Shield Advanced returns a value in NextToken that you can use in your next request, to get the next batch of objects.
        public let maxResults: Int?
        /// The ListAttacksRequest.NextMarker value from a previous call to ListAttacksRequest. Pass null if this is the first call.
        public let nextToken: String?
        /// The ARN (Amazon Resource Name) of the resource that was attacked. If this is left blank, all applicable resources for this account will be included.
        public let resourceArns: [String]?
        /// The start of the time period for the attacks. This is a timestamp type. The sample request above indicates a number type because the default used by WAF is Unix time in seconds. However any valid timestamp format is allowed.
        public let startTime: TimeRange?

        public init(endTime: TimeRange? = nil, maxResults: Int? = nil, nextToken: String? = nil, resourceArns: [String]? = nil, startTime: TimeRange? = nil) {
            self.endTime = endTime
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resourceArns = resourceArns
            self.startTime = startTime
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 10000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 4096)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^.*$")
            try self.resourceArns?.forEach {
                try validate($0, name: "resourceArns[]", parent: name, max: 2048)
                try validate($0, name: "resourceArns[]", parent: name, min: 1)
                try validate($0, name: "resourceArns[]", parent: name, pattern: "^arn:aws.*")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case endTime = "EndTime"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case resourceArns = "ResourceArns"
            case startTime = "StartTime"
        }
    }

    public struct ListAttacksResponse: AWSDecodableShape {
        /// The attack information for the specified time range.
        public let attackSummaries: [AttackSummary]?
        /// The token returned by a previous call to indicate that there is more data available. If not null, more results are available. Pass this value for the NextMarker parameter in a subsequent call to ListAttacks to retrieve the next set of items. Shield Advanced might return the list of AttackSummary objects in batches smaller than the number specified by MaxResults. If there are more attack summary objects to return, Shield Advanced will always also return a NextToken.
        public let nextToken: String?

        public init(attackSummaries: [AttackSummary]? = nil, nextToken: String? = nil) {
            self.attackSummaries = attackSummaries
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case attackSummaries = "AttackSummaries"
            case nextToken = "NextToken"
        }
    }

    public struct ListProtectionGroupsRequest: AWSEncodableShape {
        /// The maximum number of ProtectionGroup objects to return. If you leave this blank, Shield Advanced returns the first 20 results. This is a maximum value. Shield Advanced might return the results in smaller batches. That is, the number of objects returned could be less than MaxResults, even if there are still more objects yet to return. If there are more objects to return, Shield Advanced returns a value in NextToken that you can use in your next request, to get the next batch of objects.
        public let maxResults: Int?
        /// The next token value from a previous call to ListProtectionGroups. Pass null if this is the first call.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 10000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 4096)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^.*$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListProtectionGroupsResponse: AWSDecodableShape {
        /// If you specify a value for MaxResults and you have more protection groups than the value of MaxResults, AWS Shield Advanced returns this token that you can use in your next request, to get the next batch of objects.
        public let nextToken: String?
        public let protectionGroups: [ProtectionGroup]

        public init(nextToken: String? = nil, protectionGroups: [ProtectionGroup]) {
            self.nextToken = nextToken
            self.protectionGroups = protectionGroups
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case protectionGroups = "ProtectionGroups"
        }
    }

    public struct ListProtectionsRequest: AWSEncodableShape {
        /// The maximum number of Protection objects to return. If you leave this blank, Shield Advanced returns the first 20 results. This is a maximum value. Shield Advanced might return the results in smaller batches. That is, the number of objects returned could be less than MaxResults, even if there are still more objects yet to return. If there are more objects to return, Shield Advanced returns a value in NextToken that you can use in your next request, to get the next batch of objects.
        public let maxResults: Int?
        /// The ListProtectionsRequest.NextToken value from a previous call to ListProtections. Pass null if this is the first call.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 10000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 4096)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^.*$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListProtectionsResponse: AWSDecodableShape {
        /// If you specify a value for MaxResults and you have more Protections than the value of MaxResults, AWS Shield Advanced returns a NextToken value in the response that allows you to list another group of Protections. For the second and subsequent ListProtections requests, specify the value of NextToken from the previous response to get information about another batch of Protections. Shield Advanced might return the list of Protection objects in batches smaller than the number specified by MaxResults. If there are more Protection objects to return, Shield Advanced will always also return a NextToken.
        public let nextToken: String?
        /// The array of enabled Protection objects.
        public let protections: [Protection]?

        public init(nextToken: String? = nil, protections: [Protection]? = nil) {
            self.nextToken = nextToken
            self.protections = protections
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case protections = "Protections"
        }
    }

    public struct ListResourcesInProtectionGroupRequest: AWSEncodableShape {
        /// The maximum number of resource ARN objects to return. If you leave this blank, Shield Advanced returns the first 20 results. This is a maximum value. Shield Advanced might return the results in smaller batches. That is, the number of objects returned could be less than MaxResults, even if there are still more objects yet to return. If there are more objects to return, Shield Advanced returns a value in NextToken that you can use in your next request, to get the next batch of objects.
        public let maxResults: Int?
        /// The next token value from a previous call to ListResourcesInProtectionGroup. Pass null if this is the first call.
        public let nextToken: String?
        /// The name of the protection group. You use this to identify the protection group in lists and to manage the protection group, for example to update, delete, or describe it.
        public let protectionGroupId: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, protectionGroupId: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.protectionGroupId = protectionGroupId
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 10000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 0)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 4096)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^.*$")
            try self.validate(self.protectionGroupId, name: "protectionGroupId", parent: name, max: 36)
            try self.validate(self.protectionGroupId, name: "protectionGroupId", parent: name, min: 1)
            try self.validate(self.protectionGroupId, name: "protectionGroupId", parent: name, pattern: "[a-zA-Z0-9\\\\-]*")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case protectionGroupId = "ProtectionGroupId"
        }
    }

    public struct ListResourcesInProtectionGroupResponse: AWSDecodableShape {
        /// If you specify a value for MaxResults and you have more resources in the protection group than the value of MaxResults, AWS Shield Advanced returns this token that you can use in your next request, to get the next batch of objects.
        public let nextToken: String?
        /// The Amazon Resource Names (ARNs) of the resources that are included in the protection group.
        public let resourceArns: [String]

        public init(nextToken: String? = nil, resourceArns: [String]) {
            self.nextToken = nextToken
            self.resourceArns = resourceArns
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case resourceArns = "ResourceArns"
        }
    }

    public struct Mitigation: AWSDecodableShape {
        /// The name of the mitigation taken for this attack.
        public let mitigationName: String?

        public init(mitigationName: String? = nil) {
            self.mitigationName = mitigationName
        }

        private enum CodingKeys: String, CodingKey {
            case mitigationName = "MitigationName"
        }
    }

    public struct Protection: AWSDecodableShape {
        /// The unique identifier (ID) for the Route 53 health check that's associated with the protection.
        public let healthCheckIds: [String]?
        /// The unique identifier (ID) of the protection.
        public let id: String?
        /// The name of the protection. For example, My CloudFront distributions.
        public let name: String?
        /// The ARN (Amazon Resource Name) of the AWS resource that is protected.
        public let resourceArn: String?

        public init(healthCheckIds: [String]? = nil, id: String? = nil, name: String? = nil, resourceArn: String? = nil) {
            self.healthCheckIds = healthCheckIds
            self.id = id
            self.name = name
            self.resourceArn = resourceArn
        }

        private enum CodingKeys: String, CodingKey {
            case healthCheckIds = "HealthCheckIds"
            case id = "Id"
            case name = "Name"
            case resourceArn = "ResourceArn"
        }
    }

    public struct ProtectionGroup: AWSDecodableShape {
        /// Defines how AWS Shield combines resource data for the group in order to detect, mitigate, and report events.   Sum - Use the total traffic across the group. This is a good choice for most cases. Examples include Elastic IP addresses for EC2 instances that scale manually or automatically.   Mean - Use the average of the traffic across the group. This is a good choice for resources that share traffic uniformly. Examples include accelerators and load balancers.   Max - Use the highest traffic from each resource. This is useful for resources that don't share traffic and for resources that share that traffic in a non-uniform way. Examples include CloudFront distributions and origin resources for CloudFront distributions.
        public let aggregation: ProtectionGroupAggregation
        /// The Amazon Resource Names (ARNs) of the resources to include in the protection group. You must set this when you set Pattern to ARBITRARY and you must not set it for any other Pattern setting.
        public let members: [String]
        /// The criteria to use to choose the protected resources for inclusion in the group. You can include all resources that have protections, provide a list of resource Amazon Resource Names (ARNs), or include all resources of a specified resource type.
        public let pattern: ProtectionGroupPattern
        /// The name of the protection group. You use this to identify the protection group in lists and to manage the protection group, for example to update, delete, or describe it.
        public let protectionGroupId: String
        /// The resource type to include in the protection group. All protected resources of this type are included in the protection group. You must set this when you set Pattern to BY_RESOURCE_TYPE and you must not set it for any other Pattern setting.
        public let resourceType: ProtectedResourceType?

        public init(aggregation: ProtectionGroupAggregation, members: [String], pattern: ProtectionGroupPattern, protectionGroupId: String, resourceType: ProtectedResourceType? = nil) {
            self.aggregation = aggregation
            self.members = members
            self.pattern = pattern
            self.protectionGroupId = protectionGroupId
            self.resourceType = resourceType
        }

        private enum CodingKeys: String, CodingKey {
            case aggregation = "Aggregation"
            case members = "Members"
            case pattern = "Pattern"
            case protectionGroupId = "ProtectionGroupId"
            case resourceType = "ResourceType"
        }
    }

    public struct ProtectionGroupArbitraryPatternLimits: AWSDecodableShape {
        /// The maximum number of resources you can specify for a single arbitrary pattern in a protection group.
        public let maxMembers: Int64

        public init(maxMembers: Int64) {
            self.maxMembers = maxMembers
        }

        private enum CodingKeys: String, CodingKey {
            case maxMembers = "MaxMembers"
        }
    }

    public struct ProtectionGroupLimits: AWSDecodableShape {
        /// The maximum number of protection groups that you can have at one time.
        public let maxProtectionGroups: Int64
        /// Limits settings by pattern type in the protection groups for your subscription.
        public let patternTypeLimits: ProtectionGroupPatternTypeLimits

        public init(maxProtectionGroups: Int64, patternTypeLimits: ProtectionGroupPatternTypeLimits) {
            self.maxProtectionGroups = maxProtectionGroups
            self.patternTypeLimits = patternTypeLimits
        }

        private enum CodingKeys: String, CodingKey {
            case maxProtectionGroups = "MaxProtectionGroups"
            case patternTypeLimits = "PatternTypeLimits"
        }
    }

    public struct ProtectionGroupPatternTypeLimits: AWSDecodableShape {
        /// Limits settings on protection groups with arbitrary pattern type.
        public let arbitraryPatternLimits: ProtectionGroupArbitraryPatternLimits

        public init(arbitraryPatternLimits: ProtectionGroupArbitraryPatternLimits) {
            self.arbitraryPatternLimits = arbitraryPatternLimits
        }

        private enum CodingKeys: String, CodingKey {
            case arbitraryPatternLimits = "ArbitraryPatternLimits"
        }
    }

    public struct ProtectionLimits: AWSDecodableShape {
        /// The maximum number of resource types that you can specify in a protection.
        public let protectedResourceTypeLimits: [Limit]

        public init(protectedResourceTypeLimits: [Limit]) {
            self.protectedResourceTypeLimits = protectedResourceTypeLimits
        }

        private enum CodingKeys: String, CodingKey {
            case protectedResourceTypeLimits = "ProtectedResourceTypeLimits"
        }
    }

    public struct SubResourceSummary: AWSDecodableShape {
        /// The list of attack types and associated counters.
        public let attackVectors: [SummarizedAttackVector]?
        /// The counters that describe the details of the attack.
        public let counters: [SummarizedCounter]?
        /// The unique identifier (ID) of the SubResource.
        public let id: String?
        /// The SubResource type.
        public let type: SubResourceType?

        public init(attackVectors: [SummarizedAttackVector]? = nil, counters: [SummarizedCounter]? = nil, id: String? = nil, type: SubResourceType? = nil) {
            self.attackVectors = attackVectors
            self.counters = counters
            self.id = id
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case attackVectors = "AttackVectors"
            case counters = "Counters"
            case id = "Id"
            case type = "Type"
        }
    }

    public struct Subscription: AWSDecodableShape {
        /// If ENABLED, the subscription will be automatically renewed at the end of the existing subscription period. When you initally create a subscription, AutoRenew is set to ENABLED. You can change this by submitting an UpdateSubscription request. If the UpdateSubscription request does not included a value for AutoRenew, the existing value for AutoRenew remains unchanged.
        public let autoRenew: AutoRenew?
        /// The date and time your subscription will end.
        public let endTime: Date?
        /// Specifies how many protections of a given type you can create.
        public let limits: [Limit]?
        /// If ENABLED, the DDoS Response Team (DRT) will use email and phone to notify contacts about escalations to the DRT and to initiate proactive customer support. If PENDING, you have requested proactive engagement and the request is pending. The status changes to ENABLED when your request is fully processed. If DISABLED, the DRT will not proactively notify contacts about escalations or to initiate proactive customer support.
        public let proactiveEngagementStatus: ProactiveEngagementStatus?
        /// The start time of the subscription, in Unix time in seconds. For more information see timestamp.
        public let startTime: Date?
        /// Limits settings for your subscription.
        public let subscriptionLimits: SubscriptionLimits
        /// The length, in seconds, of the AWS Shield Advanced subscription for the account.
        public let timeCommitmentInSeconds: Int64?

        public init(autoRenew: AutoRenew? = nil, endTime: Date? = nil, limits: [Limit]? = nil, proactiveEngagementStatus: ProactiveEngagementStatus? = nil, startTime: Date? = nil, subscriptionLimits: SubscriptionLimits, timeCommitmentInSeconds: Int64? = nil) {
            self.autoRenew = autoRenew
            self.endTime = endTime
            self.limits = limits
            self.proactiveEngagementStatus = proactiveEngagementStatus
            self.startTime = startTime
            self.subscriptionLimits = subscriptionLimits
            self.timeCommitmentInSeconds = timeCommitmentInSeconds
        }

        private enum CodingKeys: String, CodingKey {
            case autoRenew = "AutoRenew"
            case endTime = "EndTime"
            case limits = "Limits"
            case proactiveEngagementStatus = "ProactiveEngagementStatus"
            case startTime = "StartTime"
            case subscriptionLimits = "SubscriptionLimits"
            case timeCommitmentInSeconds = "TimeCommitmentInSeconds"
        }
    }

    public struct SubscriptionLimits: AWSDecodableShape {
        /// Limits settings on protection groups for your subscription.
        public let protectionGroupLimits: ProtectionGroupLimits
        /// Limits settings on protections for your subscription.
        public let protectionLimits: ProtectionLimits

        public init(protectionGroupLimits: ProtectionGroupLimits, protectionLimits: ProtectionLimits) {
            self.protectionGroupLimits = protectionGroupLimits
            self.protectionLimits = protectionLimits
        }

        private enum CodingKeys: String, CodingKey {
            case protectionGroupLimits = "ProtectionGroupLimits"
            case protectionLimits = "ProtectionLimits"
        }
    }

    public struct SummarizedAttackVector: AWSDecodableShape {
        /// The list of counters that describe the details of the attack.
        public let vectorCounters: [SummarizedCounter]?
        /// The attack type, for example, SNMP reflection or SYN flood.
        public let vectorType: String

        public init(vectorCounters: [SummarizedCounter]? = nil, vectorType: String) {
            self.vectorCounters = vectorCounters
            self.vectorType = vectorType
        }

        private enum CodingKeys: String, CodingKey {
            case vectorCounters = "VectorCounters"
            case vectorType = "VectorType"
        }
    }

    public struct SummarizedCounter: AWSDecodableShape {
        /// The average value of the counter for a specified time period.
        public let average: Double?
        /// The maximum value of the counter for a specified time period.
        public let max: Double?
        /// The number of counters for a specified time period.
        public let n: Int?
        /// The counter name.
        public let name: String?
        /// The total of counter values for a specified time period.
        public let sum: Double?
        /// The unit of the counters.
        public let unit: String?

        public init(average: Double? = nil, max: Double? = nil, n: Int? = nil, name: String? = nil, sum: Double? = nil, unit: String? = nil) {
            self.average = average
            self.max = max
            self.n = n
            self.name = name
            self.sum = sum
            self.unit = unit
        }

        private enum CodingKeys: String, CodingKey {
            case average = "Average"
            case max = "Max"
            case n = "N"
            case name = "Name"
            case sum = "Sum"
            case unit = "Unit"
        }
    }

    public struct TimeRange: AWSEncodableShape & AWSDecodableShape {
        /// The start time, in Unix time in seconds. For more information see timestamp.
        public let fromInclusive: Date?
        /// The end time, in Unix time in seconds. For more information see timestamp.
        public let toExclusive: Date?

        public init(fromInclusive: Date? = nil, toExclusive: Date? = nil) {
            self.fromInclusive = fromInclusive
            self.toExclusive = toExclusive
        }

        private enum CodingKeys: String, CodingKey {
            case fromInclusive = "FromInclusive"
            case toExclusive = "ToExclusive"
        }
    }

    public struct UpdateEmergencyContactSettingsRequest: AWSEncodableShape {
        /// A list of email addresses and phone numbers that the DDoS Response Team (DRT) can use to contact you if you have proactive engagement enabled, for escalations to the DRT and to initiate proactive customer support. If you have proactive engagement enabled, the contact list must include at least one phone number.
        public let emergencyContactList: [EmergencyContact]?

        public init(emergencyContactList: [EmergencyContact]? = nil) {
            self.emergencyContactList = emergencyContactList
        }

        public func validate(name: String) throws {
            try self.emergencyContactList?.forEach {
                try $0.validate(name: "\(name).emergencyContactList[]")
            }
            try self.validate(self.emergencyContactList, name: "emergencyContactList", parent: name, max: 10)
            try self.validate(self.emergencyContactList, name: "emergencyContactList", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case emergencyContactList = "EmergencyContactList"
        }
    }

    public struct UpdateEmergencyContactSettingsResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateProtectionGroupRequest: AWSEncodableShape {
        /// Defines how AWS Shield combines resource data for the group in order to detect, mitigate, and report events.   Sum - Use the total traffic across the group. This is a good choice for most cases. Examples include Elastic IP addresses for EC2 instances that scale manually or automatically.   Mean - Use the average of the traffic across the group. This is a good choice for resources that share traffic uniformly. Examples include accelerators and load balancers.   Max - Use the highest traffic from each resource. This is useful for resources that don't share traffic and for resources that share that traffic in a non-uniform way. Examples include CloudFront distributions and origin resources for CloudFront distributions.
        public let aggregation: ProtectionGroupAggregation
        /// The Amazon Resource Names (ARNs) of the resources to include in the protection group. You must set this when you set Pattern to ARBITRARY and you must not set it for any other Pattern setting.
        public let members: [String]?
        /// The criteria to use to choose the protected resources for inclusion in the group. You can include all resources that have protections, provide a list of resource Amazon Resource Names (ARNs), or include all resources of a specified resource type.
        public let pattern: ProtectionGroupPattern
        /// The name of the protection group. You use this to identify the protection group in lists and to manage the protection group, for example to update, delete, or describe it.
        public let protectionGroupId: String
        /// The resource type to include in the protection group. All protected resources of this type are included in the protection group. You must set this when you set Pattern to BY_RESOURCE_TYPE and you must not set it for any other Pattern setting.
        public let resourceType: ProtectedResourceType?

        public init(aggregation: ProtectionGroupAggregation, members: [String]? = nil, pattern: ProtectionGroupPattern, protectionGroupId: String, resourceType: ProtectedResourceType? = nil) {
            self.aggregation = aggregation
            self.members = members
            self.pattern = pattern
            self.protectionGroupId = protectionGroupId
            self.resourceType = resourceType
        }

        public func validate(name: String) throws {
            try self.members?.forEach {
                try validate($0, name: "members[]", parent: name, max: 2048)
                try validate($0, name: "members[]", parent: name, min: 1)
                try validate($0, name: "members[]", parent: name, pattern: "^arn:aws.*")
            }
            try self.validate(self.members, name: "members", parent: name, max: 10000)
            try self.validate(self.members, name: "members", parent: name, min: 0)
            try self.validate(self.protectionGroupId, name: "protectionGroupId", parent: name, max: 36)
            try self.validate(self.protectionGroupId, name: "protectionGroupId", parent: name, min: 1)
            try self.validate(self.protectionGroupId, name: "protectionGroupId", parent: name, pattern: "[a-zA-Z0-9\\\\-]*")
        }

        private enum CodingKeys: String, CodingKey {
            case aggregation = "Aggregation"
            case members = "Members"
            case pattern = "Pattern"
            case protectionGroupId = "ProtectionGroupId"
            case resourceType = "ResourceType"
        }
    }

    public struct UpdateProtectionGroupResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateSubscriptionRequest: AWSEncodableShape {
        /// When you initally create a subscription, AutoRenew is set to ENABLED. If ENABLED, the subscription will be automatically renewed at the end of the existing subscription period. You can change this by submitting an UpdateSubscription request. If the UpdateSubscription request does not included a value for AutoRenew, the existing value for AutoRenew remains unchanged.
        public let autoRenew: AutoRenew?

        public init(autoRenew: AutoRenew? = nil) {
            self.autoRenew = autoRenew
        }

        private enum CodingKeys: String, CodingKey {
            case autoRenew = "AutoRenew"
        }
    }

    public struct UpdateSubscriptionResponse: AWSDecodableShape {
        public init() {}
    }
}
